require 'rails'
require 'devise'
require "kuztuscms/engine"

module Kuztuscms
  autoload :Settings, 'kuztuscms/settings'

  # namespace cms layouts
  mattr_accessor :layout_prefix
  @@layout_prefix = 'kuztuscms_layout_'

  # current page
  mattr_accessor :page
  @@page = nil

  # settings
  mattr_accessor :settings
  @@settings = Kuztuscms::Settings

  # current article
  mattr_accessor :article
  @@article = nil

  class << self
    # returns name for partial
    def template_path(name)
      return "kuztuscms/pages/#{name}"
    end
  end

end
